package com.ruoyi.api.apkVersion.service.impl;

import com.ruoyi.api.apkVersion.entity.Page;
import com.ruoyi.api.apkVersion.entity.PageData;
import com.ruoyi.api.apkVersion.mapper.ApkVersionMapper;
import com.ruoyi.api.apkVersion.service.ApkVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明： APK版本管理接口实现类
 * <p>
 * 时间：2020-05-25
 */
@Service
@Transactional //开启事物
public class ApkVersionServiceImpl implements ApkVersionService {

  @Autowired
  private ApkVersionMapper apkversionMapper;

  /**
   * 新增
   *
   * @param pd
   * @throws Exception
   */
  public void save(PageData pd) throws Exception {
    apkversionMapper.save(pd);
  }

  /**
   * 删除
   *
   * @param pd
   * @throws Exception
   */
  public void delete(PageData pd) throws Exception {
    apkversionMapper.delete(pd);
  }

  /**
   * 修改
   *
   * @param pd
   * @throws Exception
   */
  public void edit(PageData pd) throws Exception {
    apkversionMapper.edit(pd);
  }

  /**
   * 列表
   *
   * @param page
   * @throws Exception
   */
  public List
    <PageData> list(Page page) throws Exception {
    return apkversionMapper.datalistPage(page);
  }

  /**
   * 列表(全部)
   *
   * @param pd
   * @throws Exception
   */
  public List
    <PageData> listAll(PageData pd) throws Exception {
    return apkversionMapper.listAll(pd);
  }

  /**
   * 通过id获取数据
   *
   * @param pd
   * @throws Exception
   */
  public PageData findById(PageData pd) throws Exception {
    return apkversionMapper.findById(pd);
  }

  /**
   * 批量删除
   *
   * @param ArrayDATA_IDS
   * @throws Exception
   */
  public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
    apkversionMapper.deleteAll(ArrayDATA_IDS);
  }

  @Override
  public PageData updateCheck(String plat) {
    return apkversionMapper.updateCheck(plat);
  }

}

